package com.zs.springboot;

import com.zs.springboot.service.UserService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

//@SpringBootApplication中就有@Configuration
//@SpringBootApplication中就有@ComponentScan,
//当没有设置basePackages 默认会将当前注解所在类的包当做是扫描包
@SpringBootApplication
public class SpringbootApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext ioc = SpringApplication.run(SpringbootApplication.class, args);
        UserService userService = ioc.getBean(UserService.class);
        userService.getUser();
    }

}
